import request from '@/utils/request'

// 查询租赁记录列表
export function listFeLeaseRecord(query) {
  return request({
    url: '/life/feLeaseRecord/list',
    method: 'get',
    params: query
  })
}

// 查询租赁记录详细
export function getFeLeaseRecord(id) {
  return request({
    url: '/life/feLeaseRecord/' + id,
    method: 'get'
  })
}

// 新增租赁记录
export function addFeLeaseRecord(data) {
  return request({
    url: '/life/feLeaseRecord',
    method: 'post',
    data: data
  })
}

// 修改租赁记录
export function updateFeLeaseRecord(data) {
  return request({
    url: '/life/feLeaseRecord',
    method: 'put',
    data: data
  })
}

export function updateEffect(data) {
  return request({
    url: '/life/feLeaseRecord/updateEffect',
    method: 'post',
    data: data
  })
}

export function createBill(data) {
  return request({
      url: '/life/feLeaseRecord/createBill',
      method: 'post',
      data: data
    }
  )
}

export function listQyEnterpriseFee(query){
  return request({
    url: '/life/feLeaseRecord/otherFeeList',
    method: 'get',
    params: query
  })
}


export function getOtherFee(id){
  return request({
    url: '/life/feLeaseRecord/otherFee/' + id,
    method: 'get'
  })
}


export function updateQyEnterpriseFee(data){
  return request({
    url: '/life/feLeaseRecord/updateOtherFee',
    method: 'post',
    data: data
  })
}

// 删除租赁记录
export function delFeLeaseRecord(id) {
  return request({
    url: '/life/feLeaseRecord/' + id,
    method: 'delete'
  })
}
